<?php

switch($module) {
    case 'property': {
            $pro_current  = "class = 'current'";
            break;
    }case
    'intro': {
            $intro_current = "class = 'current'";
            break;
    }case
    'user': {
            $user_current = "class = 'current'";
            break;
    }case
    'member': {
            $mem_current  = "class = 'current'";
            break;
    }case
    'news': {
            $news_current = "class = 'current'";
            break;
    }case
    'projects': {
            $projects_current = "class = 'current'";
            break;
    }case
    'faq': {
            $faq_current  = "class = 'current'";
            break;
    }case
    'setting': {
            $set_current  = "class = 'current'";
            break;
    }case
    'log': {
            $log_current  = "class = 'current'";
            break;
    }case
    'document': {
            $doc_current  = "class = 'current'";
            break;
    }case
    'adv': {
            $adv_current  = "class = 'current'";
            break;
        }case
    'partner': {
            $adv_current  = "class = 'current'";
            break;
	}case
    'video': {
            $video_current  = "class = 'current'";
            break;
    }default
    : {
            $ho_current   = "class = 'current'";
            break;
        }
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>GTCReal.vn Administrator</title>
        <link type="text/css" rel="stylesheet" href="styles/admin.css" />
        <link type="text/css" rel="stylesheet" href="styles/thickbox.css" />
        <link type="text/css" rel="stylesheet" href="styles/jquery.alerts.css" media="screen"/>
        <link rel="stylesheet" href="js/calendar/calendar-mos.css" type="text/css" title="green" media="all" />
        <script type="text/javascript">
            var ADMIN_URL = '<?php echo ADMIN_URL; ?>';
        </script>
        <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAC3Y09Qidipp1hf5jKxdCZxTxidEnvjx2g6FpxxVAAJKzQSn5QhSjVpJS2ZGg-LIUVXLatt1d8V3jNw"></script>
        <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="js/jquery.MultiFile.pack.js"></script>
        <script type="text/javascript" src="js/jquery.alerts.js"></script>
        <script type="text/javascript" src="js/common.js"></script>
        <script type="text/javascript" src="js/jquery.ui.draggable.js"></script>
        <script type="text/javascript" src="js/ckeditor/ckeditor.js"></script>
        <script type="text/javascript" src="js/thickbox/thickbox.js"></script>

     
    <script type="text/javascript" language="javascript" src="js/calendar/calendar_mini.js"></script>
    <script type="text/javascript" language="javascript" src="js/calendar/lang/calendar-en-GB.js"></script>
    <script type="text/javascript" language="javascript">
         function showAddress(address) {          
        
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        if (geocoder) {
            geocoder.getLatLng(address,
            function(point) {
                if (!point) {
                    alert("Xin loi, chung toi khong tim thay " + address);
                    var message = 'latitude: ' + 21.028711 + ', longitude: ' + 105.852456;
                    document.getElementById("geocodeRoboGEO").value = message;
                    //document.getElementById("lat").innerHTML = point.lat().toFixed(5);
                    //document.getElementById("lng").innerHTML = point.lng().toFixed(5);
                    map.clearOverlays()
                    map.setCenter(point, 14);
                    var marker = new GMarker(point, {draggable: true});
                    map.addOverlay(marker);

                    GEvent.addListener(marker, "dragend", function() {
                        var pt = marker.getPoint();
                        map.panTo(pt);
                        var message = 'latitude: ' + pt.lat().toFixed(5) + ', longitude: ' + pt.lng().toFixed(5);
                        document.getElementById("geocodeRoboGEO").value = message;
                        //document.getElementById("lat").innerHTML = pt.lat().toFixed(5);
                        //document.getElementById("lng").innerHTML = pt.lng().toFixed(5);
                    });


                    GEvent.addListener(map, "moveend", function() {
                        map.clearOverlays();
                        var center = map.getCenter();
                        var marker = new GMarker(center, {draggable: true});
                        map.addOverlay(marker);
                        var message = 'latitude: ' + center.lat().toFixed(5) + ', longitude: ' + center.lng().toFixed(5);
                        document.getElementById("geocodeRoboGEO").value = message;
                        //document.getElementById("lat").innerHTML = center.lat().toFixed(5);
                        //document.getElementById("lng").innerHTML = center.lng().toFixed(5);

                        GEvent.addListener(marker, "dragend", function() {
                            var pt = marker.getPoint();
                            map.panTo(pt);
                            var message = 'latitude: ' + pt.lat().toFixed(5) + ', longitude: ' + pt.lng().toFixed(5);
                            document.getElementById("geocodeRoboGEO").value = message;
                            //document.getElementById("lat").innerHTML = pt.lat().toFixed(5);
                            //document.getElementById("lng").innerHTML = pt.lng().toFixed(5);
                        });

                    });
                } else {
                    var message = 'latitude: ' + point.lat().toFixed(5) + ', longitude: ' + point.lng().toFixed(5);
                    document.getElementById("geocodeRoboGEO").value = message;
                    //document.getElementById("lat").innerHTML = point.lat().toFixed(5);
                    //document.getElementById("lng").innerHTML = point.lng().toFixed(5);
                    map.clearOverlays()
                    map.setCenter(point, 14);
                    var marker = new GMarker(point, {draggable: true});
                    map.addOverlay(marker);

                    GEvent.addListener(marker, "dragend", function() {
                        var pt = marker.getPoint();
                        map.panTo(pt);
                        var message = 'latitude: ' + pt.lat().toFixed(5) + ', longitude: ' + pt.lng().toFixed(5);
                        document.getElementById("geocodeRoboGEO").value = message;
                        //document.getElementById("lat").innerHTML = pt.lat().toFixed(5);
                        //document.getElementById("lng").innerHTML = pt.lng().toFixed(5);
                    });


                    GEvent.addListener(map, "moveend", function() {
                        map.clearOverlays();
                        var center = map.getCenter();
                        var marker = new GMarker(center, {draggable: true});
                        map.addOverlay(marker);
                        var message = 'latitude: ' + center.lat().toFixed(5) + ', longitude: ' + center.lng().toFixed(5);
                        document.getElementById("geocodeRoboGEO").value = message;
                        //document.getElementById("lat").innerHTML = center.lat().toFixed(5);
                        //document.getElementById("lng").innerHTML = center.lng().toFixed(5);

                        GEvent.addListener(marker, "dragend", function() {
                            var pt = marker.getPoint();
                            map.panTo(pt);
                            var message = 'latitude: ' + pt.lat().toFixed(5) + ', longitude: ' + pt.lng().toFixed(5);
                            document.getElementById("geocodeRoboGEO").value = message;
                            //document.getElementById("lat").innerHTML = pt.lat().toFixed(5);
                            //document.getElementById("lng").innerHTML = pt.lng().toFixed(5);
                        });

                    });

                }
            }
        );
        }
    }
    </script>

    </head>
    <body>
        <div style="height:40px;background: #375a90;padding-left: 40px;padding-top:20px"><img src="images/logo.gif"></div>
        <div id="menu">
            <ul>
                <li><a href="index.php" <?=$ho_current?> ><span>Trang chủ</span></a></li>
                <li><a href="index.php?module=intro" <?=$intro_current?> ><span>Giới thiệu</span></a></li>
                <li><a href="index.php?module=news" <?=$news_current?> ><span>Tin tức</span></a></li>
                <li><a href="index.php?module=property" <?=$pro_current?> ><span>SP giao dịch</span></a></li>
                <li><a href="index.php?module=projects" <?=$projects_current?> ><span>Thông tin dự án</span></a></li>                
                <li><a href="index.php?module=document" <?=$doc_current?> ><span>Văn bản luật</span></a></li>
                <li><a href="index.php?module=faq" <?=$faq_current?> ><span>Hỏi-Đáp</span></a></li>
                <li><a href="index.php?module=member" <?=$mem_current?> ><span>Thành viên</span></a></li>
                <li><a href="index.php?module=adv" <?=$adv_current?> ><span>QC-Đối tác</span></a></li>
				  <li><a href="index.php?module=video" <?=$video_current?> ><span>Video</span></a></li>
                <li><a href="index.php?module=user" <?=$user_current?> ><span>Quản trị viên</span></a></li>
            </ul>
        </div>
        <div class="header">

            <div class="headerright">
                
                <div style="float:right;width:200px;margin-left: 50px">Wellcome <a href="index.php?module=myaccount"><b><?=$_SESSION['adlogin']["username"]?></b></a>,<a href="<?=ADMIN_URL."/logout.php"?>">Logout</a></div>
            <div style="float: right;text-align: right;font-weight: normal">Bạn đang quản trị nội dung <?php if($_SESSION['adlang']=="en") echo '<b>Tiếng Anh</b>'; else echo '<b>Tiếng Việt</b>';?>.  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Chuyển sang <b><?php if($_SESSION['adlang']=="en") echo '<a href="lang.php">Tiếng Việt</a>'; else echo '<a href="lang.php">Tiếng Anh</a>';?></b></div>
            </div>
        </div>

